#! /bin/sh

usage="\
Usage: osgi-config --prefix [--exec-prefix] [--version] [--cxxflags] [--ldflags] [--packager]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
fi

while test $# -gt 0; do

  case $1 in
    --prefix)
      echo @DESTDIR@
      ;;
    --exec-prefix)
      echo @DESTDIR@
      ;;
    --version)
      echo @PROJECT_VERSION@
      ;;
    --cxxflags)
      echo -I@DESTDIR@/include
      ;;
    --ldflags)
      echo -L@DESTLIBDIR@ -lOSGi++ -Wl,-rpath,@DESTLIBDIR@
      ;;
    --packager)
      echo @DESTDIR@/bin/osgi-packager@EXE_EXT@
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done
